<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/11/25
 * Time: 18:35
 */
namespace app\admin\controller;

use app\BaseController;
use app\common\model\User;
use think\facade\Db;
use think\facade\View;
//use app\common\model\AdminUser;

class Index extends AdminBase
{
    public function __call($aciton = '',$params = array())
    {
        $user_info = User::get_user_info($this->user_id);
        if ($user_info) {
            // 总后台管理员
//            if ($user_info['type'] == 20) {
//                //an_redirect(AnUrl('controller'));
//
//                // 店铺管理员
//            } else {
//                return redirect(url('store/controller'));
//            }

            //return redirect(url('/controller/index/controller'));
        }


        $guide_list = array(
            '1' => array('登录<a href="https://mp.weixin.qq.com" target="_blank">公众平台</a>', SITE_URL.'/static/images/mp_weixin_guide/1.jpg'),
            '2' => array('点击[高级功能]，点击进入[编辑模式]', SITE_URL.'/static/images/mp_weixin_guide/2.jpg'),
            '3' => array('点击[关闭此功能]以关闭编辑模式', SITE_URL.'/static/images/mp_weixin_guide/3.jpg'),
            '4' => array('点击[高级功能]，点击进入[开发模式]', SITE_URL.'/static/images/mp_weixin_guide/4.jpg'),
            '5' => array('点击右上角[开启]按钮，开启成功后点击[成为开发者]进入配置页面', SITE_URL.'/static/images/mp_weixin_guide/5.png'),
            '6' => array('阅读相关协议并确认', SITE_URL.'/static/images/mp_weixin_guide/6.png'),
            '7' => array('填写提供的URL和Token并提交', SITE_URL.'/static/images/mp_weixin_guide/7.jpg')
        );

        return View::fetch('index', [
            'guide_list' => $guide_list
        ]);
    }
}